package in.iqing.control.util;

import android.content.Context;

/**
 * Created by neavo on 14-3-15.
 */

public class UnitUtil {

	public static synchronized int toPx(Context ctx, float dp) {
		return Math.round(dp * MiscUtil.getDPI(ctx));
	}

	public static synchronized int toDp(Context ctx, float px) {
		return Math.round((px / MiscUtil.getDPI(ctx)));
	}
}
